home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Libraries / Aidan's Class Libraries / Source / Headers / CLApplication.h < prev    next >
Encoding:
Text File  |  1997-07-20  |  929 b   |  38 lines  |  [TEXT/CWIE]

  1. //Copyright (c) 1997 Aidan Cully
  2. //All rights reserved
  3.  
  4. #ifndef __APPLICATION_H
  5. #define __APPLICATION_H
  6.  
  7. #include <QDOffScreen.h>
  8. #include "CLEventDispatcher.h"
  9. #include "CLCleanup.h"
  10. #include "CLBackgrounder.h"
  11.  
  12. class TApplication:
  13.     public MEventDispatcher,
  14.     public TDeviceHandler
  15. {
  16. private:
  17.     TDeviceHandler *mhKeyboard, *mhMouse, *mhNull;
  18.     static TApplication *shCurApp;
  19.     GWorldPtr mhWorld;
  20.     GDHandle mhDevice;
  21. protected:
  22.     TList<MBackgrounder*> mBackGrounds;
  23.     virtual void BuildEvent( const EventRecord& );
  24. public:
  25.     TCleanup mClean;
  26.     TApplication();
  27.     void AddBackgrounder( MBackgrounder* );
  28.     void RemoveBackgrounder( MBackgrounder* );
  29.     virtual void DispatchEvent( const EventRecord &ev );
  30.     virtual void NewDispatcher();
  31.     virtual void OldDispatcher();
  32.     static TApplication *SCurApp() {return( shCurApp );};
  33.     virtual void GetGlobalWorld( GWorldPtr&, GDHandle& );
  34.     virtual GrafPtr GetGlobalPort();
  35.     virtual void Quit();
  36. };
  37.  
  38. #endif